package com.biwin.module.security.api.dto;

import com.biwin.common.api.dto.IBwDto;
import io.swagger.annotations.ApiModel;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * 修改用户账户密码Dto
 *
 * @author biwin
 * @since 0.0.1
 */
@ApiModel(value = "修改用户密码对象 - UserPassDto",
        description = "修复系统用户密码的传参对象,需提供原密码")
public class UserPassDto implements IBwDto {

    /**
     * 用户账号
     */
    @NotBlank(message = "登录账号不能为空")
    private String username;

    /**
     * 用户旧密码
     */
    @NotBlank(message = "旧密码不能为空")
    private String oldPassword;

    /**
     * 用户新密码
     */
    @NotBlank(message = "新密码不能为空")
    @Length(min = 6, max = 12, message = "密码长度必须在6-12位之间")
    private String newPassword;

    public UserPassDto() {
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getOldPassword() {
        return oldPassword;
    }

    public void setOldPassword(String oldPassword) {
        this.oldPassword = oldPassword;
    }

    public String getNewPassword() {
        return newPassword;
    }

    public void setNewPassword(String newPassword) {
        this.newPassword = newPassword;
    }
}
